package cn.wolfcode.filter;

import com.sun.org.apache.bcel.internal.generic.RETURN;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.SelectorType;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Component;

/**
 * @Description: 根据信息标签过滤
 * @Author: 伍家钰
 * @Date: 2020/9/4 13:37
 * @Version: 1.0
 */
@Component
@RocketMQMessageListener(
        topic = "01-tag-Filter",
        consumerGroup = "tage-Filter-group",
        // 根据元素标签过滤
        selectorType = SelectorType.TAG,
        selectorExpression = "tagA||tagZ"
)
public class TagFilterConsumer implements RocketMQListener<String> {

    @Override
    public void onMessage(String s) {
        System.out.println("发送的消息:" + s);
    }
}
